{{extend "base.html"}}

{{block head}}
<script type="text/javascript" charset="utf-8">
	var datagrid;
	$(function() {

		datagrid = $('#datagrid').datagrid({
			//url : '/statpost/sthardware',
			pagination : false,
			//loadMsg:'数据装载中......',
			fit : true,
			fitColumns : true,
			nowrap : false,
			border : false,
			showFooter: true,
			//nowrap: true,
			//autoRowHeight: false,
			//striped: true,
			collapsible:true,
			columns : [ [] ],
		});

		$.ajax({
			url:'/statpost/sthardware',
			beforeSend: function(){
				parent.$.messager.progress({
					text : '后台统计数据更新中....',
					interval : 100
				});
			},
			complete: function(){
				parent.$.messager.progress('close');
			},
			success:function(data) { 
				datagrid.datagrid({
					columns:[data.columns] 
				}).datagrid("loadData", data);                
			}
		});
	});
	
</script>
{{end}}

{{block bodyclass}}
<body class="easyui-layout" data-options="fit:true">
{{end}}

{{block content}}
	<div data-options="region:'center',border:false" style="overflow: hidden;">
		<table id="datagrid"></table>
	</div>

	<div id="menu" class="easyui-menu" style="width:120px;display: none;">
		<div onClick="append();" data-options="iconCls:'icon-add'">增加</div>
		<div onClick="remove();" data-options="iconCls:'icon-remove'">删除</div>
		<div onClick="edit();" data-options="iconCls:'icon-edit'">编辑</div>
	</div>
{{end}}